<!-- Last Modified 09-17-2011 by Michael Sambol -->

<!doctype html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Login</title>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../media/shadedborder.js"></script>
<script language="javascript" type="text/javascript">
  var holderBorder = RUZEE.ShadedBorder.create({ corner:20, border:2 });
</script>
<link href="../media/style.css" rel="stylesheet" type="text/css">

</head>

<body onload="get_location()" bgcolor=#2D2D2D>

<script>









function get_location() {
    navigator.geolocation.getCurrentPosition(show_map);
  
}

function show_map(position) {
  document.getElementById("latitude").value = position.coords.latitude;
  document.getElementById("longitude").value = position.coords.longitude;
}


</script>


<div id="content">

  <div id="innerholder">

    <h3><span></span><hr></h3>
    	
		
		<form action="." method="post" onsubmit="return OnSubmitForm();" >{% csrf_token %}
	
        	<div>

            	<div id="label"><b>User Name :</b></div>

                <div class="roundedfield" >  

                    <input name="username" type="text" value="{{ name }}"/>

                </div>

            </div>

            <div>

                <div id="label"><b>Password :</b></div>

                <div class="roundedfield"> 

                    <input type="password" name="password" />

                </div>    

            </div>

            <input type="submit" value="Login" id="loginbutton"  name="loginbutton" onclick="this.form.action='/login/'; return true;"/>
            <input type="submit" value="Register" id="registerbutton" name="registerbutton" onclick="this.form.action='/register/'; return true;"/>
            <input type="hidden" id="latitude" name="latitude"/>
            <input type="hidden" id="longitude" name="longitude"/>

		</form>
 <p><font color="red">{{ error_message }}</font></p>
  <p><font color="black">{{ success_message }}</font></p>

  </div>

</div>
<script language="javascript" type="text/javascript">  
    holderBorder.render('content');
</script>

</body>

</html>
